package com.easylinkin.linkappapi.calculaterule.mapper;

import com.easylinkin.linkappapi.calculaterule.entity.CalculateRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easylinkin.linkappapi.elasticsearch.entity.CalculateRuleOut;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 计算规则 Mapper 接口
 * </p>
 *
 * @author TongJie
 * @since 2020-06-17
 */
public interface CalculateRuleMapper extends BaseMapper<CalculateRule> {

    /**
     * 查询单个详情
     */
    CalculateRule getCalculateRule(@Param("id") String id);

    /**
     * 根据DataSourceID获得其对应的ruleID
     */
    List<CalculateRuleOut> getRuleInfoByDataSourceId(@Param("id") String id);
}
